//
//  YellowTitleBtn.m
//  SenMo
//
//  Created by zengyuan on 16/2/5.
//  Copyright © 2016年 ZengYuan. All rights reserved.
//

#import "YellowTitleBtn.h"

@implementation YellowTitleBtn


-(void)addTitle:(NSString *)title{

    if (!label) {
        self.imageEdgeInsets = UIEdgeInsetsMake(13, 10, 22, 10);
        
        label = [[UILabel alloc]initWithFrame:CGRectMake(0, self.bounds.size.height - 15, self.bounds.size.width ,15)];
        [self addSubview:label];
        label.font = [UIFont systemFontOfSize:11];
        label.textAlignment = NSTextAlignmentCenter;
    }
    

    label.text = title;

}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
